package base.day26.tcp;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class SendDemo1 {
    public static void main(String[] args) throws IOException {
        //创建一个socket对象
        Socket s=new Socket("127.0.0.1",10005);
        //获取一个io流，写数据
        OutputStream os = s.getOutputStream();
        os.write("tcp---".getBytes());

        os.close();
        s.close();

    }
}
